package com.zjxf.repository;

import com.zjxf.base.bean.po.UmsStoreSeller;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 商家端用户仓库
 *
 * @author ZhangWei
 * @date 2021/3/26/026 15:44
 */
@Repository
public interface UmsSellerRepository extends JpaRepository<UmsStoreSeller, Long>, JpaSpecificationExecutor<UmsStoreSeller> {

    Optional<UmsStoreSeller> findByUsernameAndDeleteState(String userName, Integer deleteState);

    Optional<UmsStoreSeller> findByIdAndDeleteState(Long id, Integer deleteState);

    Optional<UmsStoreSeller> findByUsernameAndStoreIdAndDeleteState(String username, Long storeId, Integer deleteState);
}
